<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%
request.setCharacterEncoding("GB2312");
%>
<jsp:useBean id="admin" scope="request" class="dsp.web.Admin"/>
<jsp:setProperty name="admin" property="username" param="username"/>
<jsp:setProperty name="admin" property="password" param="password"/>
<%
admin.validUser();
if(admin.isValid())
{
	session.setAttribute("admin", admin.getUsername());
	session.setAttribute("flag", Integer.toString(admin.getFlag()));
	response.sendRedirect("admin.jsp");
}
else
{	
	out.println("<script language=javascript> alert('"+ admin.getMsg() + "'); location.href='index.jsp';</script>");	
}
%>
